<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>诊断报告</title>
    <base th:href="@{http://localhost:9090/}"/>
    <style>
        #table{
            height: 150px;
            margin: auto;
            margin-top: 100px;

        }
    </style>
</head>
<body>
<div th:style="'text-align: center;margin: auto'">
    <!--已预约未就诊-->
    <div th:if="${state!=2}">
      <h3 th:text="未查询到有就诊记录" ></h3>
    </div>
    <!--已就诊-->
    <div th:if="${state==2}">
        <div id="table">
            <h3 th:text="诊断报告"></h3>
            <table border="1" cellpadding="0" cellspacing="0"
                   th:style="'margin: auto'">
                <tr th:style="'background-color:#2b669a'">
                    <td th:text="姓名"></td>
                    <td th:text="性别"></td>
                    <td th:text="门诊编号"></td>
                    <td th:text="会诊科室"></td>
                    <td th:text="开单日期"></td>
                    <td th:text="操作"></td>
                </tr>
                <tr th:each="record,recordStat:${recordList}">
                    <td th:text="${session.userSession.name}"></td>
                    <td th:text="${session.userSession.gender}"></td>
                    <td th:text="${record.recordOrdinal}"></td>
                    <td th:text="${record.recordDepartment}"></td>
                    <td th:text="${#dates.format(record.recordTime,'yyyy年MM月dd日')}"></td>
                    <td>
                        <a th:text="查看报告" th:href="@{record/view(recordOrdinal=${record.recordOrdinal},recordId=${record.recordId})}"></a>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <a th:href="@{record/torecord(currentPage=1,id=${session.userSession.id})}">首页</a>
            <a th:href="@{record/torecord(currentPage=${current} - 1,id=${session.userSession.id})}">上一页</a>
            <a th:href="@{record/torecord(currentPage=${current} + 1,id=${session.userSession.id})}">下一页</a>
            <a th:href="@{record/torecord(currentPage=${allPage},id=${session.userSession.id})}">末页</a>
            <span style="margin-left: 10px">第<span th:text="${current}"/>页/共<span th:text="${allPage}"/> 页</span>
        </div>
    </div>
</div>
</body>
</html>